package com.sjlh.centurylianhua.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sjlh.centurylianhua.entity.SaleList;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SaleListMapper extends BaseMapper<SaleList> {
    /**
     *查询内容：
     * saleList表的所有，
     * product 表的 name 起别名为 productName 以便自动赋值 SaleList 类中的 productName 属性
     * ${ew.customSqlSegment} 传递wrapper条件的固定写法
     * */
    @Select("select salelist.*,product.name productName from salelist,product "+" ${ew.customSqlSegment} ")
    List<SaleList> getInfo(@Param("ew")QueryWrapper<SaleList> wrapper);
}
